package java0.homework.config;

import java0.homework.pojo.XSchool;
import java0.homework.pojo.XStudent;
import java0.homework.pojo.Xlass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author L.xf
 * @date 2021/10/22
 */
@Configuration
public class SimplePojoAutoConfiguration {

    @Bean
    public XStudent xstudent() {
        XStudent student = new XStudent();
        student.setName("xstudent");
        student.setId(1L);
        return student;
    }

    @Bean
    public XSchool xSchool() {
        XSchool school = new XSchool();
        school.setName("xSchool");
        school.setId(1L);
        return school;
    }

    @Bean
    public Xlass xlass() {
        Xlass xlass = new Xlass();
        xlass.setName("xlass");
        xlass.setId(1L);
        return xlass;
    }
}
